﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

public enum GridType
{
    DirtLowest = 0,
    DirtLower,
    DirtMiddle,
    DirtHigh,
    DirtBest,
    Air,
}

public enum TreePartType
{
    Seed = 0,
    Root,
    Node,
}

public enum PlayerStatus
{
    StartGame,
    SetSeed,
    GrowUp,
    EndGame,
}

public class EnumConvert
{
    public static int GetGridTypeValue(GridType type)
    {
        if(type == GridType.Air)
        {
            return 0;
        }else
        {
            return (type - GridType.DirtLowest)*Const.DirtAddValue + Const.DirtOrginValue;
        }
    }

    public static GridType GetLowerDirt(GridType type)
    {
        if(type == GridType.DirtLowest || type == GridType.Air)
        {
            return GridType.DirtLowest;
        }

        return type - 1;
    }
}